﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Easy.Authorization.Models;
using Easy.Domain.Core;
using Easy.Domain.Core.Specification;

namespace Easy.Authorization.Repository
{
    class Aut_UsersRepository : Repository<Aut_Users>, IAut_UsersRepository
    {
        public Aut_UsersRepository(IAuthorizationUnitOfWork unitOfWork)
            : base(unitOfWork)
        {
        }

        public Aut_Users FindById(Guid id)
        {
            return base.Find(new DirectSpecification<Aut_Users>(e => e.Id == id));
        }

        public Aut_Users FindByUserame(string username)
        {
            return base.Find(new DirectSpecification<Aut_Users>(e => e.Username == username));
        }
    }
}
